/**
*      author: Y_Yao
*      created: 2025-04-11 22:02:38
**/

#include<bits/stdc++.h>

#define int LL
using namespace std;
using LL = long long;
const LL LLINF = 9e18;
const int INF = 0x3f3f3f3f;
const int N = 10 + 7;
struct node
{
    int T,D,L;
};


bool cmp(const node& n1,const node& n2)
{
    return n1.T + n1.D < n2.T + n2.D;
}
int n;
node a[N];

void solve()
{
    int time = 0;
    cin >> n;
    for(int i = 1;i <= n;i++)
    {
        cin >> a[i].T >> a[i].D >> a[i].L;
    }
    sort(a + 1, a + n + 1,cmp);

    int cur = 0;
    for(int i = 1;i <= n;i++)
    {
        if(cur > a[i].T + a[i].D)
        {
            cout << "NO" << endl;
            return;
        }
        cur += a[i].L;
    }
    cout << "YES" << endl;
}

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    int t = 1;
    cin >> t;
    while(t--)
    {
        solve();
    }
    return 0;
}